package com.tangtang.core.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringUtil {
    static ApplicationContext context;

    static {
        if (context == null) {
            context = new ClassPathXmlApplicationContext(
                    new String[]{"beans.xml"});
        }
    }

    public static ApplicationContext getContext() {
        return context;
    }
}
